﻿class CharacterCount

{

    static void Main()

    {

        string input = Console.ReadLine();

        int letters = 0, spaces = 0, digits = 0, others = 0;



        foreach (char c in input)

        {

            if (char.IsLetter(c))

            {

                letters++;

            }

            else if (char.IsWhiteSpace(c))

            {

                spaces++;

            }

            else if (char.IsDigit(c))

            {

                digits++;

            }

            else

            {

                others++;

            }

        }



        Console.WriteLine(letters);

        Console.WriteLine(spaces);

        Console.WriteLine(digits);

        Console.WriteLine(others);

    }

}